package com.jack.thinking.thread.core._6;

public class SingleModelStaticClass {
	public static void main(String[] args) {
		MyThread t1 = new MyThread();
		MyThread t2 = new MyThread();
		MyThread t3 = new MyThread();
		t1.start();
		t2.start();
		t3.start();
	}
}

class MyObject{
	private static class SingleClass{
		public static MyObject mo = new MyObject();
	}
	
	public static MyObject getInstance() {
		return SingleClass.mo;
	}
}

class MyThread extends Thread{
	@Override
	public void run() {
		System.out.println(MyObject.getInstance().hashCode());
	}
}